import request from '@/utils/request'
export default {
  //添加
  add (data) {
    return request({
      url: '/firmwareService/workOrder/add',
      method: 'POST',
      data
    })
  },
  //修改
  edit (data) {
    return request({
      url: '/firmwareService/workOrder/edit',
      method: 'POST',
      data
    })
  },
  //列表查询
  queryList (params) {
    return request({
      url: '/firmwareService/workOrder/queryList',
      method: 'get',
      params
    })
  },
  //分页查询
  queryPageList (params) {
    return request({
      url: '/firmwareService/workOrder/queryPageList',
      method: 'get',
      params
    })
  },
  //主键删除接口
  del (id) {
    return request({
      url: '/firmwareService/workOrder/del',
      method: 'post',
      data: {
        workOrderId: id
      }
    })
  },
  //审核
  examine (data) {
    return request({
      url: '/firmwareService/workOrder/examine',
      method: 'post',
      data
    })
  },
  //查询工单详情
  queryWorkOrderInfo (id) {
    return request({
      url: `/firmwareService/workOrder/queryWorkOrderInfo?workOrderId=${id}`,
      method: 'get'
    })
  }
}